/*-------------------------------------------------------------------------

   File :			vbisomsg.h
   Project :        VeriFone Base application
   Library :
   Description :
   Notes :
   Modification History :
     #     Date      Who                     Description
   ----- -------- ---------- ---------------------------------------------
	 0   04/22/96  Henry_G1   Created.
 **************************************************************************

   Copyright (C) 1996 by VeriFone, Inc.

   All rights reserved.  No part of this software may be reproduced,
   transmitted, transcribed, stored in a retrieval system, or translated
   into any language or computer language, in any form or by any means,
   electronic, mechanical, magnetic, optical, chemical, manual or otherwise,
   without the prior written permission of VeriFone, Inc.

---------------------------------------------------------------------------*/

#ifdef ISO8583_DEFINED

#ifndef ISO8MSG
#define ISO8MSG


#define TABLE(name)             (void *)name, 0
#define FUNCTION(name)          (void *)name, 0
#define VARIABLE(name)          (void *)name,sizeof(name)

#define ISO8583_BCD_LNG				15    /* New entry in the converter T. */

extern field_struct *psrBaseIso8583FDT;
extern field_struct *srBaseIso8583FDTVars[];

extern field_struct srFldDefault02FDT;
extern field_struct srFldDefault03FDT;
extern field_struct srFldDefault04FDT;
extern field_struct srFldDefault07FDT;
extern field_struct srFldDefault11FDT;
extern field_struct srFldDefault12FDT;
extern field_struct srFldDefault13FDT;
extern field_struct srFldDefault14FDT;
extern field_struct srFldDefault15FDT;
extern field_struct srFldDefault18FDT;
extern field_struct srFldDefault22FDT;
extern field_struct srFldDefault24FDT;
extern field_struct srFldDefault25FDT;
extern field_struct srFldDefault32FDT;
extern field_struct srFldDefault35FDT;
extern field_struct srFldDefault37FDT;
extern field_struct srFldDefault38FDT;
extern field_struct srFldDefault39FDT;
extern field_struct srFldDefault41FDT;
extern field_struct srFldDefault42FDT;
extern field_struct srFldDefault43FDT;
extern field_struct srFldDefault44FDT;
extern field_struct srFldDefault45FDT;
#ifdef PAYMENT_DEFINED
extern field_struct srFldDefault48FDT;
#endif /*PAYMENT_DEFINED*/
extern field_struct srFldDefault49FDT;
extern field_struct srFldDefault52FDT;
extern field_struct srFldDefault53FDT;
extern field_struct srFldDefault54FDT;
extern field_struct srFldDefault55FDT;
extern field_struct srFldDefault60FDT;
extern field_struct srFldDefault61FDT;
extern field_struct srFldDefault62FDT;
extern field_struct srFldDefault63FDT;

int inInitBaseIso8583FDT(void);
field_struct *vdLoadISO8583FDT (int inField);


unsigned int ISO8583return_variant1 (void);
unsigned int ISO8583return_variant2 (void);

void vdOverLoadReturnISO8583Variant1Func(unsigned int (*unNewReturnISO8583Variant1)());
void vdOverLoadISO8583FDT (int, field_struct *);
unsigned int unDefaultISO8583ReturnVariant1 (void);

extern converters ISO8583convert_table [];
extern unsigned char ucSrc8583Buf[];
extern unsigned char ucDst8583Buf[];
extern unsigned char *pchSrc8583Buf;
extern unsigned char *pchDst8583Buf;

void bcd_to_lng (int inDigits);
void lng_to_bcd (int inDigits);

#endif /* ISO8MSG */
#endif /* ISO8583_DEFINED */
